#ifndef __PID_h_
#define __PID_h_
#include "headfile.h"



extern int Offset;

extern float motor1_KP;
extern float motor1_KI;
extern float motor1_KD;
extern float motor2_KP;
extern float motor2_KI;
extern float motor2_KD;

extern float k_speed_diff;

extern int motor_speed_target;
extern int default_speed_target;
	
extern int motor1_speed_target;
extern int motor2_speed_target;
extern int motor1_pwm_output;
extern int motor2_pwm_output;

extern float Angular_velocity_KP; // P
extern float Angular_velocity_KI; // I
extern float Angular_velocity_KD; // D

extern float target_angle;
extern float Angle_ring_diff_speed;

void run_pid_left();
void run_pid_right();
void speed_difference();
void Pid_Left_set();
void Pid_Right_set();

void Angular_velocity_loop();
void Steering_ring();
void Angle_ring();

#endif
